﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CopyGameFramework.Download
{
    /// <summary>
    /// 下载成功事件。
    /// </summary>
   public sealed class DownloadSuccessEventArgs
    {
        /// <summary>
        /// 初始化下载成功事件的新实例。
        /// </summary>
        /// <param name="serialId">下载任务的序列编号。</param>
        /// <param name="downloadPath">下载后存放路径。</param>
        /// <param name="downloadUri">下载地址。</param>
        /// <param name="currentLength">当前大小。</param>
        /// <param name="userData">用户自定义数据。</param>
        public DownloadSuccessEventArgs(int serialId, string downloadPath, string downloadUri, int currentLength, object userData)
        {
            SerialId = serialId;
            DownloadPath = downloadPath;
            DownloadUri = downloadUri;
            CurrentLength = currentLength;
            UserData = userData;
        }

    /// <summary>
    /// 获取下载任务的序列编号。
    /// </summary>
    public int SerialId
    {
        get;
        private set;
    }

    /// <summary>
    /// 获取下载后存放路径。
    /// </summary>
    public string DownloadPath
    {
        get;
        private set;
    }

    /// <summary>
    /// 获取下载地址。
    /// </summary>
    public string DownloadUri
    {
        get;
        private set;
    }

    /// <summary>
    /// 获取当前大小。
    /// </summary>
    public int CurrentLength
    {
        get;
        private set;
    }

    /// <summary>
    /// 获取用户自定义数据。
    /// </summary>
    public object UserData
    {
        get;
        private set;
    }
}
}
